<?php /* Smarty version 2.6.16, created on 2009-04-16 03:14:36
         compiled from AjaxFriendsList.html */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'language', 'AjaxFriendsList.html', 10, false),array('function', 'url', 'AjaxFriendsList.html', 14, false),array('function', 'html_options', 'AjaxFriendsList.html', 19, false),array('function', 'module', 'AjaxFriendsList.html', 26, false),array('modifier', 'escape', 'AjaxFriendsList.html', 53, false),)), $this); ?>
<script src="design/js/scriptaculous/prototype.js" type="text/javascript"></script>
<script src="design/js/scriptaculous/effects.js" type="text/javascript"></script>
<script src="design/js/scriptaculous/dragdrop.js" type="text/javascript"></script>
<script src="design/js/scriptaculous/controls.js" type="text/javascript"></script>

<?php if ($this->_tpl_vars['aFriends']): ?>
<table style="width: 100%;" class="mainmenu5" cellpadding="0" cellspacing="0" border="0">
<tr>
    <td width="7"><img src="design/pic/spacer.gif" class="sqr1" alt="" height="7" width="7" /></td>
    <td class="block_header"><?php echo smarty_function_language(array('text' => 'my_top_friends'), $this);?>
</td>
</tr>
</table>

<form method="post" action="<?php echo smarty_function_url(array('link' => 'current'), $this);?>
">
<div style="padding:8px; font-size:9pt;">
<?php echo smarty_function_language(array('text' => 'Mod_Account.total_friends_display'), $this);?>
:
<select name="total_friends" id="total_friends" onchange="window.focus(); sId('totalFriendsSaved').innerHTML='<?php echo smarty_function_language(array('text' => 'Mod_Account.saving'), $this);?>
...'; xajax_updateTotalFriends(sId('total_friends').value);">
	<option value=""><?php echo smarty_function_language(array('text' => 'select'), $this);?>
</option>
	<?php echo smarty_function_html_options(array('options' => $this->_tpl_vars['aTotalFriends'],'selected' => $this->_tpl_vars['aTotalSelect']), $this);?>

</select> <span id="totalFriendsSaved"></span>
</div>
</form>

<div id="cart" class="cart" style="margin-top: 10px;">
	<div id="items">
		<div id="top_friends"><?php echo smarty_function_module(array('module' => 'Account','component' => 'AjaxTopFriends'), $this);?>
</div>
	</div>
</div>
<?php echo '
<script type="text/javascript">
	Droppables.add(\'cart\', {
		accept:\'products\',
		onDrop:function(element)
			{
				if (element.id.substr(0, 4) != "item")
				{
					xajax_displayTopFriends(encodeURIComponent(element.id));
				}
			}});	
</script>
'; ?>

<?php endif; ?>

<table style="width: 100%;" class="mainmenu5" cellpadding="0" cellspacing="0" border="0">
<tr>
    <td width="7"><img src="design/pic/spacer.gif" class="sqr1" alt="" height="7" width="7" /></td>
    <td class="block_header"><?php echo smarty_function_language(array('text' => 'friends_list'), $this);?>
</td>
</tr>
</table>
<?php if ($this->_tpl_vars['aFriends']): ?>
<br />
<form method="post" action="<?php echo smarty_function_url(array('link' => 'public.account.friends'), $this);?>
">
	<label><?php echo smarty_function_language(array('text' => 'Mod_Account.username'), $this);?>
: <input type="text" name="username" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['sUserName'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" /> <input type="submit" value="<?php echo smarty_function_language(array('text' => 'Mod_Account.search'), $this);?>
" /></label>
</form>
<br />
<?php endif;  if ($this->_tpl_vars['sUserName']): ?>
<div style="text-align:center;">
	<?php echo smarty_function_language(array('text' => 'Mod_Account.found_x_friends','replace' => $this->_tpl_vars['iCnt']), $this);?>

	<br />
	<br />
</div>
<?php endif; ?>

<?php if ($this->_tpl_vars['aFriends']): ?>
    <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['sRootPath'])."/_blocks/pager.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
    <br />
    <br />
    <table style="width:100%;" cellpadding="5" cellspacing="0">
        <tr class="border13">
        <?php $_from = $this->_tpl_vars['aFriends']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['friends'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['friends']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['aFriend']):
        $this->_foreach['friends']['iteration']++;
?>
            <td style="text-align:center;vertical-align:middle;">
            <table style="margin-left:auto;margin-right:auto;">
                <tr>
                    <td style="font-size:8pt;" class="color">                    
                    <div>
                   		<div><b><a class="link_description" href="<?php echo smarty_function_url(array('link' => 'public.user','name' => $this->_tpl_vars['aFriend']['user']), $this);?>
"> <?php echo $this->_tpl_vars['aFriend']['user']; ?>
</a> </b></div>
                   		<?php echo smarty_function_module(array('module' => 'Account','component' => 'Avatar','sUser' => $this->_tpl_vars['aFriend']['user'],'iSize' => 60,'onmouseover' => "showInfo5('".($this->_tpl_vars['aFriend']['user'])."', '', '');",'onmouseout' => "return nd();",'style' => "position: relative; z-index: 0; opacity: 0.99999; top: 0px; left: 0px; cursor:move;",'class' => 'products','id' => ($this->_tpl_vars['aFriend']['user'])), $this);?>

                    </div>                    
                    <script type="text/javascript">new Draggable('<?php echo $this->_tpl_vars['aFriend']['user']; ?>
', <?php echo '{revert:true})</script>'; ?>

                    <div style="padding:5px;">[ <a href="<?php echo smarty_function_url(array('link' => 'public.account.friends','act' => 'delete_friend','mode' => $this->_tpl_vars['sMode'],'user' => $this->_tpl_vars['aFriend']['user']), $this);?>
" onclick="return sure();"> <?php echo smarty_function_language(array('text' => 'delete_383'), $this);?>
 </a> ]</div>                                             
                    </td>
                </tr>
            </table>
            </td>
            <?php if ($this->_foreach['friends']['iteration'] % $this->_tpl_vars['iRowSize'] == 0): ?>
            </tr>
            <tr class="<?php if (( $this->_foreach['friends']['iteration']/$this->_tpl_vars['iRowSize'] ) % 2 == 0): ?>border13<?php endif; ?>">
            <?php endif; ?>
        <?php endforeach; endif; unset($_from); ?>
        <?php if ($this->_foreach['friends']['total'] % $this->_tpl_vars['iRowSize'] != 0): ?>
            <td colspan="<?php echo $this->_tpl_vars['iRowSize']; ?>
">&nbsp;</td>
        <?php endif; ?>
        </tr>
    </table>
    <br />   
    <?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => ($this->_tpl_vars['sRootPath'])."/_blocks/pager.html", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
    <br />
    <br />
<?php else: ?>
	<?php if (! $this->_tpl_vars['sUserName']): ?>
    <table style="width:100%;">
        <tr>
            <td><div class="message_info"><?php echo smarty_function_language(array('text' => 'there_are_no_friends_yet'), $this);?>
</div></td>
        </tr>
    </table>
    <?php endif;  endif; ?>